#ifndef GDN_EVENT_H
#define GDN_EVENT_H

#include "gdn/Vector2.h"
#include "gdn/Key.h"
#include "gdn/MouseButton.h"

namespace gdn
{
	// No joystick support yet
	class Event
	{
		public:
			enum Type
			{
				// Window events - probably won't be used on consoles
				WindowClosed = 0,
				WindowResized,

				WindowLostFocus,    // Useful for autopausing
				WindowGainedFocus,

				// Keyboard events
				TextEntered,

				KeyPressed,
				KeyReleased,

				// Mouse events
				MouseMoved,

				MouseButtonPressed,
				MouseButtonReleased,

				/*
				// Joystick events
				JoystickButtonPressed,
				JoystickButtonReleased,

				JoystickStickMoved,
				*/

				// Other
				Count

			} type;

			/*
			struct JoystickButton
			{
				unsigned int joystickId;
				unsigned int buttonId;
			};

			struct JoystickStick
			{
				unsigned int joystickId;

			};
			*/

			union
			{
				struct
				{
					float x;
					float y;
				};

				struct
				{
					float width;
					float height;
				};

				char text;

				Mouse::Button mouseButton;

				Key::Code key;

				/*
				JoystickButton joystickButton;
				JoystickStick  joystickStick;
				*/
			};

			Event();
			Event( Type theType );
			Event( Type theType, Vector2f vector2 );
			Event( Type theType, char theText );
			Event( Type theType, Mouse::Button theMouseButton );
			Event( Type theType, Key::Code theKey );
	};
}

#endif // GDN_EVENT_H
